main(r,i,j)
{
	unsigned long long c;
	for(;~scanf("%d%d%d",&r,&r,&r)&&r;printf("%llu\n",c*4))
		for(c=j=0,i=r-1;j!=r;j++)
			if(i*i+j*j<r*r)
				c+=i+1;
			else{
				while(i*i+j*j>=r*r)i--;
				c+=i+1;
			}
}
